const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  publicPath: "./",//配置静态资源
  devServer: {
    proxy: {
      '/api': {
        // 服务器地址为localhost:5600 或者 http://127.0.0.1:5600
        pathRewrite: {
          '^/api/': ''
        },
        target: 'http://127.0.0.1:5000',
        changeOrigin: true,
      }
    },
    host: '0.0.0.0',
    // https:true,
    // port: 6103,
    // client: {
    //   webSocketURL: 'ws://0.0.0.0:6103/ws',
    // },
    headers: {
      'Access-Control-Allow-Origin': '*',
    }
  },
  transpileDependencies: true,
  // configureWebpack: {
  //   resolve: {
  //     alias: {
  //       '@': path.resolve(__dirname, 'src')
  //     }
  //   }
  // }
  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          plugins: [
            require('tailwindcss'),
            require('autoprefixer')
          ]
        }
      }
    }
  }

})
